#ifndef SPECIALABILITY_H
#define SPECIALABILITY_H


#include "dtwentycore_global.h"


#include <modelitemset.h>
#include <modelitem.h>


class CharacterClass;


class DTWENTYCORESHARED_EXPORT SpecialAbility : public ModelItem
{
    Q_OBJECT

    Q_PROPERTY(int multiple READ multiple WRITE setMultiple NOTIFY multipleChanged)
    Q_PROPERTY(int type READ type WRITE setType NOTIFY typeChanged)


    /// \todo Put these in to shared data to avoid memory consumption
    int m_multiple;
    int m_type;


public:

    Q_INVOKABLE SpecialAbility(QObject *parent = 0);
    SpecialAbility(const SpecialAbility& other);

    int multiple() const;
    int type() const;


signals:

    void multipleChanged(int arg);
    void typeChanged(int arg);


public slots:

    void setMultiple(int arg);
    void setType(int arg);

    void addCharacterLevel(CharacterClass *characterClass, const int& level);


};

Q_DECLARE_METATYPE(SpecialAbility)


class DTWENTYCORESHARED_EXPORT SpecialAbilities : public ModelItemSet<SpecialAbility>
{
    Q_OBJECT

public:

    Q_INVOKABLE SpecialAbilities(QObject* parent = 0) :
        ModelItemSet<SpecialAbility>(parent)
    {
        setName("Special Abilities");
    }

    SpecialAbilities(const SpecialAbilities& other) :
        ModelItemSet<SpecialAbility>(other)
    {
    }

};

Q_DECLARE_METATYPE(SpecialAbilities)


#endif // SPECIALABILITY_H

